filechooser: Make / work as shortcut again
authorMatthias Clasen <mclasen@redhat.com>
Sat, 27 Mar 2021 13:57:00 +0000 (09:57 -0400)
committerMatthias Clasen <mclasen@redhat.com>
Sat, 27 Mar 2021 13:57:00 +0000 (09:57 -0400)
Typing / is meant to open the location entry, so
prevent search from capturing that key.

gtk/gtkfilechooserwidget.c

index 0349a4f6ca54af0189242dbd2585c1371810ddc8..751357d4357bc98e6b9c5e396dfba810f44169cf 100644 (file)
@@ -7729,6 +7729,9 @@ captured_key (GtkEventControllerKey *controller,
        impl->location_mode == LOCATION_MODE_FILENAME_ENTRY))
     return GDK_EVENT_PROPAGATE;
 
+  if (keyval == GDK_KEY_slash)
+    return GDK_EVENT_PROPAGATE;
+
   handled = gtk_event_controller_key_forward (controller, GTK_WIDGET (impl->search_entry));
   if (handled == GDK_EVENT_STOP)
     operation_mode_set (impl, OPERATION_MODE_SEARCH);